<?

$Db = new oracleDb;
$Db->init($_SESSION["ORCL"],
           $_SESSION["OPASS"],
           $_SESSION["SID"],
           _NO_COMMENT);

if ($Db->connect()) {

	$thisMdl  = "MST-MODEL";

	$optPrivs = "";

  if($UID->getPrivs( $thisMdl, _VIEW_RIGHTS) > 0){

  	$optPrivs .=	"  <td> ".$GHtml->formInputButton("<font size='5'>View</font>", // The label
    							                                  "view",                       // var Name
    							                                  "View",                       // var value
    							                                  $entryBoxStyle)." </td>\n";   // var properties
  }
  if($UID->getPrivs( $thisMdl, _MODIFY_RIGHTS) > 0){

  	$optPrivs .=	"  <td> ".$GHtml->formInputButton("<font size='5'>Modify</font>", // The label
            							                          "modify",                       // var Name
            							                          "Modify",                       // var value
            							                          $entryBoxStyle)." </td>\n";     // var properties
  }
  if($UID->getPrivs( $thisMdl, _APPROVED_RIGHTS) > 0){

  	$optPrivs	.=	"  <td> ".$GHtml->formInputButton("<font size='5'>Approve</font>", // The label
            							                          "approve",                       // var Name
            							                          "Approve",                       // var value
            							                          $entryBoxStyle)." </td>\n";      // var properties
  }
  if($UID->getPrivs( $thisMdl, _DELETE_RIGHTS) > 0){

  	$optPrivs	.=	"  <td> ".$GHtml->formInputButton("<font size='5'>Cancel</font>", // The label
            							                          "cancel",                       // var Name
            							                          "Cancel",                       // var value
            							                          $entryBoxStyle)." </td>\n";     // var properties
  }
  if($UID->getPrivs( $thisMdl, _EDIT_RIGHTS) > 0){

  	$optPrivs	.=	"  <td> ".$GHtml->formInputButton("<font size='5'>Delete</font>", // The label
            							                          "delete",                       // var Name
            							                          "Delete",                       // var value
            							                          $entryBoxStyle)." </td>\n";     // var properties
  }

  $jobId = $_POST["radioview"];

	if($_POST["transVariable"] != true){

  	echo  "<link rel=\"stylesheet\" type=\"text/css\" href=\"../myMenu.css\"/>\n".

  			  /**
          * This module js
          *
          */
  			  "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/misc.js\"></SCRIPT> \n".
  			  "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/ajax.js\"></SCRIPT> \n".

  	      "<form action=viewdboredit.php name='crtList' method=post>\n".
  				"<table border='1'>\n".
  				"<tr>\n".
  				"<input type='submit' value='back' name='back'>\n".
  			  $optPrivs.
  			  "<input type='hidden' name='radioview' value='".$_POST["radioview"]."'>\n".
  			  "<input type='hidden' name='selbox[]'  value='".$_POST["radioview"]."'>\n".
  				"</tr>\n".
  				"</table>\n".
  				"</form>\n";

  }else{

    /* Do nothing */
  }

  require("views/view_html.php");
}else{

	$Misc->usrDieJs(_DB_CONN_ERROR);
}
?> 